package org.real.guetshop.service;

import org.real.guetshop.exception.StorageNotEnoughException;
import org.real.guetshop.pojo.dto.OrderPageDTO;
import org.real.guetshop.pojo.dto.OrderSubmitDTO;
import org.real.guetshop.pojo.vo.OrderOldVO;
import org.real.guetshop.result.PageResult;

import java.util.List;

public interface OrderService {

    /**
     * 用户下单
     * @param orderSubmitDTO
     * @return
     */
    void submit(OrderSubmitDTO orderSubmitDTO) throws StorageNotEnoughException;

    /**
     * 订单完成
     */
    void finish(String number);

    /**
     * 查看历史订单
     * @return
     */
    List<OrderOldVO> getHistory();

    /**
     * 商家订单分页查询
     * @param orderPageDTO
     * @return
     */
    PageResult getPage(OrderPageDTO orderPageDTO);

}
